home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 83
/
083.d81
/
number logic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
284 lines
1 poke55,0:poke56,128:clr:dv=peek(186):ifdv<8thendv=8
2 poke53281,0:poke53280,0:printchr$(147)chr$(14)chr$(8);
5 poke53272,29
6 dim m$(9),r$(4):f=0:ff=0:s=54272:gosub9900:o$=chr$(8):f$=chr$(15)
10 fori=1to8:readm$(i):next
11 data "[208]rint [208]uzzle (1525) "
12 data "[208]rint [208]uzzle (other) "
13 data "[208]rint [211]olution (1525) "
14 data "[208]rint [211]olution (other)"
15 data "[210]ead [201]t "
16 data "[200]int "
17 data "[195]redits "
18 data "[204]oadstar "
20 tp$="[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
22 md$="[221][155] [146][221]"
23 ln$="[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
24 bt$="[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
25 goto30
26 print"[147]"tp$;
27 fori=1to23:printmd$;:next:printbt$:poke2023,125:poke56295,1
28 fori=217to242:pokei,peek(i)or128:next:return
30 gosub26
32 print"[221][156] [206]umber [204]ogic [146][221]";
34 println$;
60 poke214,21:print
65 println$;
70 print"[221][154] [213]se cursor keys/[210][197][212][213][210][206] to select [146][221]";
80 gosub28
100 print"";
102 printtab(7)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
104 qq$="[221] [221]"
105 fori=1to10:print""qq$:next
106 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
107 poke214,5:print
109 fori=1to8:printtab(9)""m$(i):next
145 sys52496,1
146 poke198,0
150 r=5:m=1:poke214,r:print:printtab(9)"[154]"m$(m):m1=m:r1=r
155 getk$:ifk$=""then155
160 ifk$=chr$(13)thengosub9930:goto200
165 ifk$="[145]"thenm=m-1:r=r-1:ifm<1thenm=8:r=12
170 ifk$=""thenm=m+1:r=r+1:ifm>8thenm=1:r=5
175 ifm<>m1thenpoke214,r1:print:printtab(9)""m$(m1):gosub9910
180 poke214,r:print:printtab(9)"[154]"m$(m)
182 m1=m:r1=r
185 goto155
190 :
200 onmgoto1000,2000,3000,4000,12000,700,500,11000
205 goto150
500 sys52496,2
525 poke214,16:print:printtab(7)"[159][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
527 printtab(7)"[221] [208]uzzle [194]y [194]. [211]chulak [221]"
535 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
544 t=1
545 getk$:ifk$<>""then550
546 t=t+1:ift<100then545
550 sys52499,2:gosub28:goto155
555 :
700 sys52496,2
725 poke214,16:print:printtab(3)"[156][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
727 printtab(3)"[221] [212]he first number across is 256 [221]"
735 printtab(3)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
744 t=1
745 getk$:ifk$<>""then550
746 t=t+1:ift<100then545
750 sys52499,2:gosub28:goto155
755 :
1000 gosub9000:ifppthen155
1002 gosub6000
1005 open4,4
1010 print#4,f$" [176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]";o$
1020 print#4,f$" [221] 1[221] [221] 2[221][166][166][221] 3[221][166][166][221] 4[221] [221] 5[221]";o$
1022 print#4,f$" [221] [221] [221] [221][166][166][221] [221][166][166][221] [221] [221] [221]";o$
1025 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1030 print#4,f$" [221] [221][166][166][221] 6[221] 7[221] [221] 8[221] [221][166][166][221] [221]";o$
1032 print#4,f$" [221] [221][166][166][221] [221] [221] [221] [221] [221][166][166][221] [221]";o$
1035 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1040 print#4,f$" [221] 9[221]10[221][166][166][221]11[221] [221] [221][166][166][221]12[221] [221]";o$
1042 print#4,f$" [221] [221] [221][166][166][221] [221] [221] [221][166][166][221] [221] [221]";o$
1045 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1050 print#4,f$" [221][166][166][221]13[221]14[221][166][166][221] [221][166][166][221]15[221] [221][166][166][221]";o$
1052 print#4,f$" [221][166][166][221] [221] [221][166][166][221] [221][166][166][221] [221] [221][166][166][221]";o$
1055 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1060 print#4,f$" [221]16[221] [221] [221] [221][166][166][221]17[221] [221] [221] [221]";o$
1062 print#4,f$" [221] [221] [221] [221] [221][166][166][221] [221] [221] [221] [221]";o$
1065 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1070 print#4,f$" [221][166][166][221]18[221] [221][166][166][221]19[221][166][166][221]20[221] [221][166][166][221]";o$
1072 print#4,f$" [221][166][166][221] [221] [221][166][166][221] [221][166][166][221] [221] [221][166][166][221]";o$
1075 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1080 print#4,f$" [221]21[221] [221][166][166][221]22[221] [221]23[221][166][166][221]24[221]25[221]";o$
1082 print#4,f$" [221] [221] [221][166][166][221] [221] [221] [221][166][166][221] [221] [221]";o$
1085 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1090 print#4,f$" [221] [221][166][166][221]26[221] [221] [221] [221]27[221][166][166][221] [221]";o$
1092 print#4,f$" [221] [221][166][166][221] [221] [221] [221] [221] [221][166][166][221] [221]";o$
1095 print#4,f$" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";o$
1100 print#4,f$" [221]28[221] [221] [221][166][166][221] [221][166][166][221]29[221] [221] [221]";o$
1102 print#4,f$" [221] [221] [221] [221][166][166][221] [221][166][166][221] [221] [221] [221]";o$
1105 print#4,f$" [173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]"
1110 print#4:close4:gosub5000:goto155
1115 :
2000 gosub9000:ifppthen155
2002 gosub6000
2005 open4,4
2010 print#4," -- -- -- -- -- -- -- -- -- "
2020 print#4," : 1: : 2:xx: 3:xx: 4: : 5:"
2022 print#4," : : : :xx: :xx: : : :"
2025 print#4," --+--+--+--+--+--+--+--+-- "
2030 print#4," : :xx: 6: 7: : 8: :xx: :"
2032 print#4," : :xx: : : : : :xx: :"
2035 print#4," --+--+--+--+--+--+--+--+-- "
2040 print#4," : 9:10:xx:11: : :xx:12: :"
2042 print#4," : : :xx: : : :xx: : :"
2045 print#4," --+--+--+--+--+--+--+--+-- "
2050 print#4," :xx:13:14:xx: :xx:15: :xx:"
2052 print#4," :xx: : :xx: :xx: : :xx:"
2055 print#4," --+--+--+--+--+--+--+--+-- "
2060 print#4," :16: : : :xx:17: : : :"
2062 print#4," : : : : :xx: : : :